/*
 * XML Type:  BankMessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.BankMessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML BankMessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class BankMessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractMessageSetVersionImpl implements net.ofx.types.x2003.x04.BankMessageSetV1
{
    
    public BankMessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName INVALIDACCTTYPE$0 = 
        new javax.xml.namespace.QName("", "INVALIDACCTTYPE");
    private static final javax.xml.namespace.QName CLOSINGAVAIL$2 = 
        new javax.xml.namespace.QName("", "CLOSINGAVAIL");
    private static final javax.xml.namespace.QName XFERPROF$4 = 
        new javax.xml.namespace.QName("", "XFERPROF");
    private static final javax.xml.namespace.QName STPCHKPROF$6 = 
        new javax.xml.namespace.QName("", "STPCHKPROF");
    private static final javax.xml.namespace.QName EMAILPROF$8 = 
        new javax.xml.namespace.QName("", "EMAILPROF");
    
    
    /**
     * Gets array of all "INVALIDACCTTYPE" elements
     */
    public net.ofx.types.x2003.x04.AccountEnum.Enum[] getINVALIDACCTTYPEArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVALIDACCTTYPE$0, targetList);
            net.ofx.types.x2003.x04.AccountEnum.Enum[] result = new net.ofx.types.x2003.x04.AccountEnum.Enum[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = (net.ofx.types.x2003.x04.AccountEnum.Enum)((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getEnumValue();
            return result;
        }
    }
    
    /**
     * Gets ith "INVALIDACCTTYPE" element
     */
    public net.ofx.types.x2003.x04.AccountEnum.Enum getINVALIDACCTTYPEArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INVALIDACCTTYPE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (net.ofx.types.x2003.x04.AccountEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "INVALIDACCTTYPE" elements
     */
    public net.ofx.types.x2003.x04.AccountEnum[] xgetINVALIDACCTTYPEArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVALIDACCTTYPE$0, targetList);
            net.ofx.types.x2003.x04.AccountEnum[] result = new net.ofx.types.x2003.x04.AccountEnum[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "INVALIDACCTTYPE" element
     */
    public net.ofx.types.x2003.x04.AccountEnum xgetINVALIDACCTTYPEArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountEnum target = null;
            target = (net.ofx.types.x2003.x04.AccountEnum)get_store().find_element_user(INVALIDACCTTYPE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (net.ofx.types.x2003.x04.AccountEnum)target;
        }
    }
    
    /**
     * Returns number of "INVALIDACCTTYPE" element
     */
    public int sizeOfINVALIDACCTTYPEArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVALIDACCTTYPE$0);
        }
    }
    
    /**
     * Sets array of all "INVALIDACCTTYPE" element
     */
    public void setINVALIDACCTTYPEArray(net.ofx.types.x2003.x04.AccountEnum.Enum[] invalidaccttypeArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invalidaccttypeArray, INVALIDACCTTYPE$0);
        }
    }
    
    /**
     * Sets ith "INVALIDACCTTYPE" element
     */
    public void setINVALIDACCTTYPEArray(int i, net.ofx.types.x2003.x04.AccountEnum.Enum invalidaccttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INVALIDACCTTYPE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setEnumValue(invalidaccttype);
        }
    }
    
    /**
     * Sets (as xml) array of all "INVALIDACCTTYPE" element
     */
    public void xsetINVALIDACCTTYPEArray(net.ofx.types.x2003.x04.AccountEnum[]invalidaccttypeArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invalidaccttypeArray, INVALIDACCTTYPE$0);
        }
    }
    
    /**
     * Sets (as xml) ith "INVALIDACCTTYPE" element
     */
    public void xsetINVALIDACCTTYPEArray(int i, net.ofx.types.x2003.x04.AccountEnum invalidaccttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountEnum target = null;
            target = (net.ofx.types.x2003.x04.AccountEnum)get_store().find_element_user(INVALIDACCTTYPE$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invalidaccttype);
        }
    }
    
    /**
     * Inserts the value as the ith "INVALIDACCTTYPE" element
     */
    public void insertINVALIDACCTTYPE(int i, net.ofx.types.x2003.x04.AccountEnum.Enum invalidaccttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(INVALIDACCTTYPE$0, i);
            target.setEnumValue(invalidaccttype);
        }
    }
    
    /**
     * Appends the value as the last "INVALIDACCTTYPE" element
     */
    public void addINVALIDACCTTYPE(net.ofx.types.x2003.x04.AccountEnum.Enum invalidaccttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INVALIDACCTTYPE$0);
            target.setEnumValue(invalidaccttype);
        }
    }
    
    /**
     * Removes the ith "INVALIDACCTTYPE" element
     */
    public void removeINVALIDACCTTYPE(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVALIDACCTTYPE$0, i);
        }
    }
    
    /**
     * Gets the "CLOSINGAVAIL" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getCLOSINGAVAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CLOSINGAVAIL$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "CLOSINGAVAIL" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetCLOSINGAVAIL()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(CLOSINGAVAIL$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CLOSINGAVAIL" element
     */
    public void setCLOSINGAVAIL(net.ofx.types.x2003.x04.BooleanType.Enum closingavail)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CLOSINGAVAIL$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CLOSINGAVAIL$2);
            }
            target.setEnumValue(closingavail);
        }
    }
    
    /**
     * Sets (as xml) the "CLOSINGAVAIL" element
     */
    public void xsetCLOSINGAVAIL(net.ofx.types.x2003.x04.BooleanType closingavail)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(CLOSINGAVAIL$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(CLOSINGAVAIL$2);
            }
            target.set(closingavail);
        }
    }
    
    /**
     * Gets the "XFERPROF" element
     */
    public net.ofx.types.x2003.x04.TransferProfile getXFERPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TransferProfile target = null;
            target = (net.ofx.types.x2003.x04.TransferProfile)get_store().find_element_user(XFERPROF$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "XFERPROF" element
     */
    public boolean isSetXFERPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(XFERPROF$4) != 0;
        }
    }
    
    /**
     * Sets the "XFERPROF" element
     */
    public void setXFERPROF(net.ofx.types.x2003.x04.TransferProfile xferprof)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TransferProfile target = null;
            target = (net.ofx.types.x2003.x04.TransferProfile)get_store().find_element_user(XFERPROF$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.TransferProfile)get_store().add_element_user(XFERPROF$4);
            }
            target.set(xferprof);
        }
    }
    
    /**
     * Appends and returns a new empty "XFERPROF" element
     */
    public net.ofx.types.x2003.x04.TransferProfile addNewXFERPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.TransferProfile target = null;
            target = (net.ofx.types.x2003.x04.TransferProfile)get_store().add_element_user(XFERPROF$4);
            return target;
        }
    }
    
    /**
     * Unsets the "XFERPROF" element
     */
    public void unsetXFERPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(XFERPROF$4, 0);
        }
    }
    
    /**
     * Gets the "STPCHKPROF" element
     */
    public net.ofx.types.x2003.x04.StopCheckProfile getSTPCHKPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckProfile target = null;
            target = (net.ofx.types.x2003.x04.StopCheckProfile)get_store().find_element_user(STPCHKPROF$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "STPCHKPROF" element
     */
    public boolean isSetSTPCHKPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STPCHKPROF$6) != 0;
        }
    }
    
    /**
     * Sets the "STPCHKPROF" element
     */
    public void setSTPCHKPROF(net.ofx.types.x2003.x04.StopCheckProfile stpchkprof)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckProfile target = null;
            target = (net.ofx.types.x2003.x04.StopCheckProfile)get_store().find_element_user(STPCHKPROF$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.StopCheckProfile)get_store().add_element_user(STPCHKPROF$6);
            }
            target.set(stpchkprof);
        }
    }
    
    /**
     * Appends and returns a new empty "STPCHKPROF" element
     */
    public net.ofx.types.x2003.x04.StopCheckProfile addNewSTPCHKPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckProfile target = null;
            target = (net.ofx.types.x2003.x04.StopCheckProfile)get_store().add_element_user(STPCHKPROF$6);
            return target;
        }
    }
    
    /**
     * Unsets the "STPCHKPROF" element
     */
    public void unsetSTPCHKPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STPCHKPROF$6, 0);
        }
    }
    
    /**
     * Gets the "EMAILPROF" element
     */
    public net.ofx.types.x2003.x04.EmailProfile getEMAILPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.EmailProfile target = null;
            target = (net.ofx.types.x2003.x04.EmailProfile)get_store().find_element_user(EMAILPROF$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "EMAILPROF" element
     */
    public void setEMAILPROF(net.ofx.types.x2003.x04.EmailProfile emailprof)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.EmailProfile target = null;
            target = (net.ofx.types.x2003.x04.EmailProfile)get_store().find_element_user(EMAILPROF$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.EmailProfile)get_store().add_element_user(EMAILPROF$8);
            }
            target.set(emailprof);
        }
    }
    
    /**
     * Appends and returns a new empty "EMAILPROF" element
     */
    public net.ofx.types.x2003.x04.EmailProfile addNewEMAILPROF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.EmailProfile target = null;
            target = (net.ofx.types.x2003.x04.EmailProfile)get_store().add_element_user(EMAILPROF$8);
            return target;
        }
    }
}
